@extends('admin.layout.layout', ['row' => @$page])

@section('contain')


    <div class="portlet">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject font-green-sharp bold uppercase">{{ @$page['title'] }}</span>
            </div>
            <div class="actions">
                <div class="item">
                    {{--<a href="/{{ request()->path() }}/create" class="btn btn-sm btn-primary">{{ ts('ADDNEW') }}</a>--}}
                </div>
            </div>
        </div>

        <div class="filter-wrapper">
            <form action="/{{ request()->path() }}/"  class="form-inline filter-form">
                <div class=" input-group mb-3 custom-control-inline">
                    <div class="input-group-prepend">
                        <select name="label" class="form-control">
                            <option value="">-{{ ts('SELECT') }}-</option>
                            <option value="1" {{ request()->input('label') == 1 ? 'selected' : '' }}>{{ ts('ENGLISH') }}</option>
                            <option value="2" {{ request()->input('label') == 2 ? 'selected' : '' }}>{{ ts('CHINESET') }}</option>
                            <option value="3" {{ request()->input('label') == 3 ? 'selected' : '' }}>{{ ts('CHINESES') }}</option>
                        </select>
                    </div>

                    <input type="text" class="form-control" name="value" value="{{ request()->input('value') }}">
                </div>

                <div class="mb-3">
                    <button class="btn btn-primary">{{ ts('SEARCH') }}</button>
                </div>

            </form>
        </div>

        <div>
            <table class="table table-s1">
                <thead>
                <tr>
                    <th style="width: 8%;">ID</th>
                    <th style="width: 25%;">{{ ts('ENGLISH') }}</th>
                    <th style="width: 25%;">{{ ts('CHINESET') }}</th>
                    <th style="width: 25%;">{{ ts('CHINESES') }}</th>
                    <th style="width:270px">{{ ts('OPTION') }}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $v)
                    <tr class="item-list">
                        <td>
                            <a href="/{{ request()->path() }}/{{ $v->id }}" target="_blank">{{ $v->id }}</a>
                        </td>
                        <td>
                            <div class="truncated-3">{{ @$v->english_value }}</div>
                        </td>
                        <td>
                            <div class="truncated-3">{{ @$v->traditional_chiness_value }}</div>
                        </td>
                        <td>
                            <div class="truncated-3">{{ @$v->simplified_chiness_value }}</div>
                        </td>
                        <td>
                            <a class="btn btn-warning btn-sm" href='/{{ request()->path() }}/{{ $v->id }}/edit'>{{ ts('EDIT') }}</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            <div class="my-3">
                {{ $data->appends(request()->input())->links() }}
            </div>
        </div>

    </div>


@endsection